package com.info.zhiduoduo.core.formbean.entrustmentproject;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.info.zhiduoduo.common.excelconverter.AccountPayTypeConverter;
import com.info.zhiduoduo.common.excelconverter.InvoiceTypeConverter;
import com.info.zhiduoduo.common.validator.ExcelDecimalValid;
import com.info.zhiduoduo.common.validator.ExcelValid;
import com.info.zhiduoduo.common.validator.IdCard;
import com.info.zhiduoduo.common.validator.Phone;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.math.BigDecimal;

/**
 * 导入委托接单
 * @author tianyonghong
 * @create 2022/8/4
 */
@Data
public class ImportEntrustProjectFormBean {

    @ApiModelProperty("序号")
    @ExcelProperty(index = 0)
    private String index;

    @ApiModelProperty("项目名称(必填）")
    @ExcelProperty(index = 1)
    @ExcelValid(message = "项目名称不能为空")
    private String name;

    @ApiModelProperty("项目内容/交付标准(必填）")
    @ExcelProperty(index = 2)
    @ExcelValid(message = "项目内容/交付标准不能为空")
    private String content;

    @ApiModelProperty("项目金额(导入时的金额),单位元")
    @ExcelProperty(index = 3)
    @ExcelValid(message = "项目金额不能为空")
    @ExcelDecimalValid(min = "0", max = "50000", message = "单笔发单金额必须大于0，小于50,000.00元")
    private BigDecimal projectAmount;

    @ApiModelProperty("项目分类(必填,下拉选择）")
    @ExcelProperty(index = 4)
    private String category;

    @ApiModelProperty("发票类型(必填,下拉选择）")
    @ExcelProperty(index = 5, converter = InvoiceTypeConverter.class)
    @ExcelValid(message = "发票类型不能为空")
    private Integer invoiceType;

    @ApiModelProperty("发票内容(必填）")
    @ExcelProperty(index = 6)
    @ExcelValid(message = "发票内容不能为空")
    private String invoiceContent;

    @ApiModelProperty("收款方姓名(必填）")
    @ExcelProperty(index = 7)
    @ExcelValid(message = "收款方姓名不能为空")
    private String payeeName;

    @ApiModelProperty("手机号(必填)")
    @ExcelProperty(index = 8)
    @Phone
    private String phone;

    @ApiModelProperty("账号类型(必填,下拉选择)")
    @ExcelProperty(index = 9, converter = AccountPayTypeConverter.class)
    @ExcelValid(message = "账号类型不能为空")
    private Integer accountType;

    @ApiModelProperty("收款方账户(银行卡号）")
    @ExcelProperty(index = 10)
    private String bankNo;

    @ApiModelProperty("收款方账户(支付宝账号）")
    @ExcelProperty(index = 11)
    private String alipayLogonId;

    @ApiModelProperty("收款方身份证号码(必填）")
    @ExcelProperty(index = 12)
    @ExcelValid(message = "收款方身份证号码不能为空")
//    @IdCard
    private String payeeIdNo;

    @ApiModelProperty("自然人绑定企业")
    @ExcelProperty(index = 13)
    private String bindcompname;

//    @ApiModelProperty("委托创客工作室名称(受托方)")
//    @ExcelProperty(index = 13)
//    private String entrusteeName;

    //解析后新增数据
    @ExcelIgnore
    private Integer crowdsourceid;
    //项目分类ID,默认0
    @ExcelIgnore
    private int categoryid;
    //自然人绑定的企业id
    @ExcelIgnore
    private Integer bindcompid;
    //收款账号 支付宝账号或者银行卡号
    @ExcelIgnore
    private String accountNo;
}
